import os
import openpyxl

path = r"C:\Users\ASUS\Desktop"
os.chdir(path)  # 修改工作路径

workbook = openpyxl.Workbook()
sheet = workbook.active
sheet.title = '1号sheet'
sheet['A1'] = 'name'
workbook.save('test.xlsx')